const state = {
  rawPath: null,
  name: '',
  path: '',
  fullPath: '',
  showReturn: false,
  goBackParams: { path: '/' },
  addonActions: [],
  metricsType: ''
};

const mutations = {
  setBackParams: (state: any, params: object = { path: '/' }) => {
    state.goBackParams = params;
  },
  setRawPath: (state: any, rawPath: string) => {
    state.rawPath = rawPath;
  },
  setName: (state: any, name: string) => {
    state.name = name;
  },
  setPathname: (state: any, pathname: string) => {
    state.path = pathname;
  },
  setFullPath: (state: any, fullPath: string) => {
    state.fullPath = fullPath;
  },
  setShowReturn: (state: any, showReturn: string) => {
    state.showReturn = showReturn;
  },
  setAddonActions: (state: any, addonActions: any[]) => {
    state.addonActions = addonActions;
  },
  setMetricsType: (state: any, metricsType: string) => {
    state.metricsType = metricsType;
  }
};

const actions = {};

export default {
  namespaced: true,
  state,
  mutations,
  actions
};
